#!/bin/sh
# Obtain the Date Var
MYDATE=`date +%y%m%d`
MYYEST=`date -d yesterday +%y%m%d`

#----------------------------
# Zip the OHS Access Log
#----------------------------
cd /oracle/app/oracle/ohs1013/ohs/logs
FILE='access_log error_log ssl_request_log'
for LOOP in $FILE
do
cp -p $LOOP $LOOP$MYDATE
> $LOOP
zip -m $LOOP$MYDATE.zip $LOOP$MYDATE
done

#----------------------------
# Zip the Sweapp Log
#----------------------------
cd /oracle/app/siebel/sweapp/log
zip -m ss${MYYEST}log.zip ss${MYYEST}*.log
